<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c"  uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<!DOCTYPE html >
<html  lang="zh-cn">
<head>
<meta charset="utf-8" />
<meta name="description" content="对网页的一段概括性描述" />
<meta name="keywords" content="关键字1,关键字2,关键字3..." />
<meta name="renderer" content="webkit">
<title>hiring-xxx</title>
<link rel="shortcut icon" href="<%=request.getContextPath()%>/static/common/images/favicon.ico"/>

<link rel="stylesheet" href="<%=request.getContextPath() %>/static/common/vendor/bootstrap/css/bootstrap.min.css" >
<link rel="stylesheet" href="<%=request.getContextPath()%>/static/talent/styles/signin.css">
<link rel="stylesheet" href="<%=request.getContextPath()%>/validator/jquery.validator.css">

<script src="<%=request.getContextPath()%>/static/talent/styles/signin.css"></script>

    <!-- begin新版添加的css文件-->
    <link type="text/css" rel="stylesheet" href="http://img01.zpin.net.cn/2014/c/css/resumeCenter/resumeCenter.css">
    <link type="text/css" rel="stylesheet" href="http://img01.zpin.net.cn/2014/c/css/resumeCenter/resumeCenterSZ.css">
    <link type="text/css" rel="stylesheet" href="http://img01.zpin.net.cn/2014/c/css/resumeCenter/resumeCenterDialog.css">
    <link type="text/css" rel="stylesheet" href="http://img04.zpin.net.cn/2014/c/ui/css/classlib.css">
    <!--end 新版添加的css文件-->
    <!--begin jquery-->

    <!--end jquery-->
<link rel="stylesheet" href="http://img07.zhaopin.cn/2014/common/js/layer-v2.2/layer/skin/layer.css" id="layui_layer_skinlayercss">
    
    
    <!--end 旧版以及公共css文件-->
  <!--[if lt IE 9]>
	      <script src="http://cdn.bootcss.com/html5shiv/3.7.0/html5shiv.js"></script>
	      <script src="http://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
	    <![endif]-->
</head>
<body>
 <div class="">
 <ol class="breadcrumb">
  <li><a href="<%=request.getContextPath()%>/CompanyServlet?command=goHomepageUI">主页</a></li>
  <li><a href="<%=request.getContextPath() %>/TalentServlet?command=toLoginUi">求职者登录</a></li>
  <li><a href="<%=request.getContextPath() %>/TalentServlet?command=toRegisterUi">求职者注册</a></li>
  
  <li class="pull-right"> <button class="btn btn-default" onclick="location='<%=request.getContextPath()%>/TalentServlet?command=toChangePasswordPage' ">修改密码</button></li>
</ol>
</div>

<div class="content myData">
            <div class="basicData">
            <span><h3>求职者信息管理：</h3></span>
                <div class="basicDataCon1">
                    <p class="basName">姓名:${talentEntity.name }</p>
                    <span>年龄：${sessionScope.talentEntity.age}</span>
                </div>
                <!--/.basicDataCon1-->
                <div class="basicDataCon2">

                    <p>手机：${sessionScope.talentEntity.phone}</p>
                    <p>邮箱：${sessionScope.talentEntity.email}</p>
                    <p>爱好：${sessionScope.talentEntity.hobby}</p>
                    <c:if test="${sessionScope.talentEntity.gender==1}">
                    <p>性别：男</p>
                    </c:if>
                    <c:if test="${sessionScope.talentEntity.gender==2}">
                    <p>性别：女</p>
                    </c:if>
                    <button type="button" class="btn btn-default "  onclick="location='<%=request.getContextPath()%>/TalentServlet?command=toChangeInfo' "> 修改个人资料</button>
                </div>
            </div>
</div>




<div class="content myData">
<span><h3>简历管理：</h3></span><br>
<a href="<%=request.getContextPath()%>/ResumeServlet?command=jumptoaddResume&&talentId=${talentEntity.id}">注册简历</a><br />
<table class="table table-hover">
  <tr>
    <td>求职者id</td>
    <td>求职意向</td>
    <td>工作经历</td>    
    <td>项目经验</td>
    <td>操作</td>
  </tr>
  <c:if test="${not empty resumeList}"></c:if>
  <c:forEach items="${resumeList }" var="v">
  <tr>
    <td>${v.talentId }</td>
    <td>${v.intention }</td>
    <td>${v.workExperience }</td>
    <td>${v.projectExperience }</td>  
    <td><a href="<%=request.getContextPath()%>/ResumeServlet?command=toUpdate&&id=${v.id}">修改</a>|<a href="javascript:void(0)" onclick="del(this,${v.id})">删除</a></td>
  </tr>
  </c:forEach>
</table>
</div>


<div class="content myData">
<h3>查看申请情况：</h3><br>
<table class="table table-hover">
   <tr>
     <td>序号</td>
     <td>公司名称</td>
     <td>职位</td>
     <td>申请状态</td>
     <td>处理时间</td>
   </tr>
   <c:if test="${not empty pageModel.list }">
   <c:forEach items="${pageModel.list }" var="v" varStatus="vs">
   <tr>
     <td>${vs.count }</td>
     <td>${v.company$name }</td>
     <td>${v.position$name }</td>
     <c:if test="${v.status==1 }">
     <td>已通过审核</td>
     </c:if>
     <c:if test="${v.status==2 }">
     <td>未通过</td>
     </c:if>
     <c:if test="${v.status==3 }">
     <td>待审核</td>
     </c:if>
     <td>${fn:substring(v.handleTime,0,19)}</td>
   </tr>
   </c:forEach>
   </c:if>
</table>
     <div class="pull-right">
				<!-- Standard button -->
				<button type="button" class="btn btn-default"
					onclick="location = '<%=request.getContextPath()%>/CommonServlet?command=positionAllList&&pageNo=${pageModel.first }'" <c:if test="${pageModel.pageNo ==pageModel.first }">disabled ="disable"</c:if> >首页</button>

				<!-- Provides extra visual weight and identifies the primary action in a set of buttons -->
				<button type="button" class="btn btn-primary"
					onclick="location = '<%=request.getContextPath()%>/CommonServlet?command=positionAllList&&pageNo=${pageModel.pre }'" <c:if test="${pageModel.pageNo ==pageModel.first }">disabled ="disable"</c:if>>上一页</button>

                <select onchange="go(this);">
                    <script>
                         var totalPage ='${pageModel.totalPage }';
                         var pageNo ='${pageModel.pageNo }';
                         for(var i = 1; i <= totalPage ; i++){
                        	 if(i == pageNo){
                        	     document.write('<option value="'+i+'" selected>第'+i+'页</option>');
                        	 }else{
                        		 document.write('<option value="'+i+'">第'+i+'页</option>'); 
                        	 }
                         }
                    </script>
                </select>
               
				<!-- Contextual button for informational alert messages -->
				<button type="button" class="btn btn-link">当前页</button>

				<!-- Indicates a successful or positive action -->
				<button type="button" class="btn btn-success"
					onclick="location = '<%=request.getContextPath()%>/CommonServlet?command=positionAllList&&pageNo=${pageModel.next }'" <c:if test="${pageModel.pageNo ==pageModel.last }">disabled ="disable"</c:if>>下一页</button>

				<!-- Indicates a dangerous or potentially negative action -->
				<button type="button" class="btn btn-danger"
					onclick="location = '<%=request.getContextPath()%>/CommonServlet?command=positionAllList&&pageNo=${pageModel.last }'" <c:if test="${pageModel.pageNo ==pageModel.last }">disabled ="disable"</c:if>>尾页</button>

				<!-- Deemphasize a button by making it look like a link while maintaining button behavior -->
				<!-- <button type="button" class="btn btn-link">Link</button> -->
			</div>
    
    
</div>


    <script >
     function go(obj){
    	 location = '<%=request.getContextPath()%>/CommonServlet?command=positionAllList&&pageNo='+obj.value;
     }
     
     
     
     function del(obj, resumeId) {
			
		  // $.get(url, function(data) {})
		  $.get('<%=request.getContextPath()%>/ResumeServlet?command=delete&id=' + resumeId + '&time=' + new Date().getTime(), function(text){
		     // 如果是成功了就在页面上删除当前a标签所在的tr，如果不成功给出提示
		     if (text == 'fail') {
		    	layer.msg('操作失败！', {time: 2000, icon: 5});
		     } else {
		    	layer.msg('操作成功！', {time: 2000, icon: 6});
		    	$(obj.parentNode.parentNode).remove();
		     }
		  });
		}
    </script>
	



<script   src="<%=request.getContextPath() %>/static/common/vendor/jquery.min.js"></script>
<script src="<%=request.getContextPath() %>/static/common/vendor/bootstrap-3.3.5/js/bootstrap.min.js"></script>
<script   src="<%=request.getContextPath() %>/static/common/vendor/layer/layer.js"></script>
<script src="<%=request.getContextPath()%>/static/vendor/nice-validator-0.10.11/dist/jquery.validator.min.js?local=zh-CN"></script>
</body>
</html>